﻿using System;
using System.Windows.Forms;
using Scommesse.Presenters.Admin;

namespace Scommesse.View.Admin
{
    public partial class ConfermaDialog : Form
    {
        private IAdminFormPresenter _adminFormPresenter;

        public ConfermaDialog()
        {
            InitializeComponent();
        }

        public void AddListener(IAdminFormPresenter presenter)
        {
            _adminFormPresenter = presenter;
        }

        private void SiButton_Click(object sender, EventArgs e)
        {
            _adminFormPresenter.ChiudiProgrammaESalva();
            Close();
        }

        private void NoButton_Click(object sender, EventArgs e)
        {
            _adminFormPresenter.ChiudiProgramma();
            Close();
        }
    }
}